<template>
	<view class="content">
		<!-- <u-datetime-picker :show="showMonth" v-model="date" mode="year-month" closeOnClickOverlay
			@confirm="confirmMonth" @cancel="showMonth = false" @close="showMonth = false"></u-datetime-picker>
		<u-picker :show="showYear" :columns="yearArr" @confirm="confirmYear" @cancel="showYear = false"></u-picker>
		<u-picker :show="showByYearOrMonth" :columns="[['按年份','按月份']]" @confirm="confirmYearOrMonth"
			@cancel="showByYearOrMonth = false"></u-picker> -->
		<mescroll-uni ref="mescrollRef" @init="mescrollInit" @up="upCallback" :up="upOption" :down="{use: false}">
			<view class="section-0">
				<view class="section-body">
					<view class="top-tab">
						<view :class="`item ${curTab.type === item.type ? 'item__active' : ''}`"
							@click="setCurTab(item)" v-for="item in tabList" :key="item.type">
							{{item.name}}{{curTab.type === item.type ? `(${sumTotals})` : ''}}
							<view class="shape"></view>
						</view>
					</view>
					<view class="charts">
						<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts"
							class="echarts"></view>
					</view>
					<view class="form">
						<!-- <formArea :value="form.city" :labelWidth="134"  @onChange="(e) => form.city = e"></formArea> -->
						<view class="form-item2">
							<view class="label">项目名称</view>
							<view class="shape"></view>
							<view class="input">
								<u--input placeholderClass="input-placeholder" class="input-body" v-model="form.project_name">
								</u--input>
							</view>
						</view>
						<view class="actions">
							<view class="action" @click="handleResetForm()">
								<text>重</text>
								<text>置</text>
							</view>
							<view class="action search" @click="handleSearch()">
								<text>查</text>
								<text>询</text>
							</view>
						</view>
					</view>

					<view class="list">
						<view :class="`item ${item.show ? 'item__expand' : ''}`" v-for="(item, idx0) in list"
							:key="item.id">
							<view class="parent" @click="expandChange(item.id)">
								<view class="action">
									<view class="iconfont icon-xiangyou1"></view>
								</view>
								<view class="name">
									<text class="status"
										:style="{backgroundColor: renderStatus(String(item.project_period)).color}">{{renderStatus(String(item.project_period)).name}}</text>
									{{idx0 + 1}}.
									{{item.project_name}}
								</view>
								<view class="mark" v-if="item.is_access == 100">
									<text class="iconfont icon-gongdijiankong"></text>
								</view>
							</view>
							<view class="child" v-if="item.show">
								<view class="child-item" v-for="(item2, idx) in item.children" :key="item2.id">
									<view class="child-status">
										<view class="circle"
											:style="{backgroundColor: renderStatus(String(item2.project_period)).color}">
										</view>
										<view class="status-name">
											{{item2.project_period}}
										</view>
									</view>
									<view class="top">
										<view class="name">
											{{idx0 + 1}}-{{idx + 1}}.{{item2.project_name}}
										</view>
										<view class="info">
											项目经理：{{item2.user_name}}
										</view>
										<view class="imgs">
											<view class="img">
												<text class="label"
													@click="go(`/pages/statistics/project/info/index?id=${item2.id}&name=${item2.project_name}`)">详情</text>
											</view>
											<view class="img" v-if="item2.project_name.indexOf('间隔') === -1">
												<text class="label"
													@click="go(`/pages/statistics/progress/plan/info/index?id=${item2.id}`)">
													任务计划书
												</text>
											</view>
											<view class="img" v-if="item2.project_name.indexOf('间隔') === -1">
												<text class="label"
													@click="go('/pages/statistics/project/manage/index?id=' + item2.id + '&name=' + item2.project_name)">项目管控卡</text>
											</view>
											<view class="img"
												:class="`img ${item2.is_access == 2 ? '' : 'img_disabled'}`">
												<text class="label"
													@click="item2.is_access == 2 ? go('/pages/statistics/project/place/index?name='+item2.project_name + '&id=' + item2.id) : ''">智慧工地</text>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</mescroll-uni>
	</view>
</template>

<script>
	import {
		projectAllApi,
		projectSonApi
	} from '@/api/statistics.js';
	import {
		projectCityApi,
	} from '@/api/project.js';

	// import formArea from '@/components/form_area/index.vue';
	export default {
		// components: {formArea},
		data() {
			return {
				mescroll: null, // mescroll实例对象 (此行可删,mixins已默认)
				upOption: {
					textNoMore: '-- 没有更多了 --'
				},
				sumTotals: 0,
				pageSize: 20,
				yearArr: [],
				showYear: false,
				showByYearOrMonth: false,
				curTab: {
					type: '0'
				},
				tabList: [{
						name: '全部',
						type: '0'
					},
					{
						name: '未开',
						type: '5'
					},
					{
						name: '在建',
						type: '2'
					},
					{
						name: '已投',
						type: '3'
					},
				],
				list: [],
				showMonth: false,
				date: '',
				year: '',
				formattedDate: '',
				selectYearOrMonth: '1',
				total: 0,
				form: {
					project_name: '',
					city: '全部'
				},
				option: {},
				params: '',
				customIdx: ''
			}
		},
		methods: {
			handleResetForm() {
				for (let key in this.form) {
					this.form[key] = '';
				}
				this.form.city = '全部'
				this.projectCity();
				this.mescroll.resetUpScroll();
				this.mescroll.scrollTo(0,0);
				
			},
			handleSearch() {
				this.projectCity();
				this.mescroll.resetUpScroll();
				this.mescroll.scrollTo(0,0);
			},
			renderStatus(type) {
				let str = {};
				switch (type) {
					case "1":
						str.color = '#f59617';
						str.name = '开工';
						break;
					case "2":
						str.color = '#00cdb4';
						str.name = '在建';
						break;
					case "3":
						str.color = '#4e74fa';
						str.name = '投产';
						break;
					case "4":
						str.color = '#ed451b';
						str.name = '停工';
						break;
					case "5":
						str.color = '#ff7c66';
						str.name = '未开工';
						break;
					case "在建":
						str.color = '#00cdb4';
						str.name = '在建';
						break;
					case "投产":
						str.color = '#4e74fa';
						str.name = '投产';
						break;
					case "待开":
						str.color = '#ff7c66';
						str.name = '待开';
						break;
				}
				return str;
			},
			showTips(title) {
				uni.showToast({
					title,
					icon: 'none'
				})
			},
			formatDate(timeStamp) {
				const date = new Date(timeStamp); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
				const Y = date.getFullYear() + '年';
				const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
				const D = date.getDate() + '日';
				const h = date.getHours() + ':';
				const m = date.getMinutes() + ':';
				const s = date.getSeconds();
				return Y + M;
			},
			setCurTab(item) {
				this.curTab = item;
				this.sumTotals=''
				this.projectCity();
				this.form.city = '全部'
				this.mescroll.resetUpScroll();
				this.mescroll.scrollTo(0,0);

			},
			async expandChange(id) {
				// this.list.forEach((item) => {
				// 	if (item.id === id) {

				// 		item.show = !item.show
				// 	}
				// })
				const dep = JSON.parse(JSON.stringify(this.list));
				let _idx = undefined;
				dep.forEach((item, idx) => {
					if (item.id === id) {
						if (dep[idx].show) {
							dep[idx].show = false;
						} else {
							dep[idx].show = true;
							_idx = idx;
							if (!dep[idx].children) {
								dep[idx].children = [];
							}
						}
					}
				})
				if (_idx !== undefined && dep[_idx].children && dep[_idx].children.length === 0) {
					uni.showLoading({
						title: '加载中...'
					})
					const {
						data
					} = await projectSonApi({
						project_id: dep[_idx].id
					});
					uni.hideLoading();
					dep[_idx].children = data.data;
				}
				this.list = dep;
				// projectSonApi({
				// 	project_id: id
				// }).then(res => {
				// 	if (res.data.code == 1 || res.data.code == 200) {
				// 		this.list.forEach((item) => {
				// 			if (item.id === id) {
				// 				item.children = res.data.data
				// 				item.show = !item.show
				// 			}
				// 		})
				// 	}
				// })
			},
			go(path) {
				uni.navigateTo({
					url: path
				})
			},
			onEchartSelect(res) {
				if (res.res.selected && res.res.selected.length) {
					let city = [];
					res.res.selected[0].dataIndex.forEach(item => {
						city.push(this.option.xAxis.data[item]);
					})
					this.form.city = city.join(',');
					this.mescroll.resetUpScroll();
					this.mescroll.scrollTo(0,0);
				} else {
					this.form.city = '';
					this.mescroll.resetUpScroll();
					this.mescroll.scrollTo(0,0);
				}
			},
			/*mescroll组件初始化的回调,可获取到mescroll对象 (此处可删,mixins已默认)*/
			mescrollInit(mescroll) {
				this.mescroll = mescroll;
			},

			/*上拉加载的回调*/
			async upCallback(page) {
				let obj = {
					...this.form,
					project_period: this.curTab.type == 0 ? '' : this.curTab.type
				}
				if (this.form.city === '全部') {
					delete obj.city;
				}
				// if (this.month) obj.month = this.month
				// if (this.city) obj.city = this.city
				const {
					data
				} = await projectAllApi({
					...obj,
					page: page.num,
					pageSize: this.pageSize
				});
				if (data.code === 1 || data.code === 200) {
					const list = [];
					for (let key in data.data.data) {
						list.push({
							...data.data.data[key],
							show: false
						})
					}

					// 接口返回的当前页数据列表 (数组)
					let curPageData = list;
					curPageData.forEach((item, idx) => {
						curPageData[idx].code = idx + 1 + (page.num - 1) * this.pageSize
					})
					// 接口返回的当前页数据长度 (如列表有26个数据,当前页返回8个,则curPageLen=8)
					let curPageLen = curPageData.length;
					// 接口返回的总页数 (如列表有26个数据,每页10条,共3页; 则totalPage=3)
					let totalPage = data.data.last_page;
					//设置列表数据
					if (page.num == 1) this.list = []; //如果是第一页需手动置空列表
					this.list = this.list.concat(curPageData); //追加新数据
					// 请求成功,隐藏加载状态
					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
					this.mescroll.endByPage(curPageLen, totalPage);
					setTimeout(() => {
						this.mescroll.endSuccess(curPageLen)
					}, 20)
					this.total = data.data.total
				} else {
					//  请求失败,隐藏加载状态
					this.mescroll.endErr()
				}
			},

			async projectCity() {
				uni.showLoading({
					title: '加载中...'
				})
				let obj = {
					...this.form,
					project_period: this.curTab.type == 0 ? '' : this.curTab.type
				}
				if (this.form.city === '全部') {
					delete obj.city;
				}
				const {
					data
				} = await projectCityApi({
					...obj,
				});
				// 计算顶部tab卡中图表总数，
				let totals = data.data;
				let sumTotals = 0;
				for(var i in totals){
					sumTotals += totals[i]
				}
				this.sumTotals = sumTotals;
				
				let option =  {
					grid: {
						left: '15px',
						right: '0',
						bottom: '0',
						top: '15px',
						containLabel: true
					},
					tooltip: {
						show: false
					},
					legend: {
						show: false
					},
					xAxis: {
						data: [],
						type: 'category',
						axisLine: {
							show: false
						},
						axisTick: {
							show: false
						},
						axisLabel: {
							interval: 0,
							rotate: 30,
							textStyle: {
								color: '#3b3c40',
								fontSize: 10
							}
						},
					},
					yAxis: {
						type: 'value',
						axisLine: {
							show: false
						},
						splitLine: {
							show: true,
							lineStyle: {
								color: '#d9d9d7',
								type: 'dashed'
							}
						},
						axisTick: {
							show: false
						},
						axisLabel: {
							show: false,
							textStyle: {
								color: '#3b3c40',
								fontSize: 12
							}
						},
					},
					series: [{
						name: '数量',
						type: 'bar',
						data: [],
						barWidth: '30%',
						itemStyle: {
							normal: {
								color: '#95c4fa',
								barBorderRadius: 12,
							},
						},
						label: {
							normal: {
								show: true,
								lineHeight: 10,
								formatter: '{c}',
								position: 'top',
								textStyle: {
									color: '#3b3c40',
									fontSize: 10,
								},
							},
						},
						// selectedMode: 'multiple',
						selectedMode: 'single',
						select: {
							itemStyle: {
								color: '#0535d6',
								barBorderRadius: 12,
							}
						},
					}]
				};
				if (this.customIdx !== '') {
					option.custom = {
						index: this.customIdx
					}
				}
		
				let nameArr = [];
				let dataArr = [];
				for (let key in data.data) {
					nameArr.push(key);
					dataArr.push(data.data[key]);
				}
				option.series[0].data = dataArr
				option.xAxis.data = nameArr
				this.option = option;
				uni.hideLoading()
			}
		},
		onReady() {
			this.projectCity();
		},
		onLoad(data) {
			const res = uni.getSystemInfoSync();
			this.statusBarHeight = res.statusBarHeight;
			this.date = (new Date()).valueOf();
			this.formattedDate = this.formatDate(this.date);
			const date = new Date();
			let year = date.getFullYear();
			let startyear = year - 10;
			let endyear = year + 10;
			let yearArr = []
			for (let i = startyear; i <= endyear; i++) {
				yearArr.push(i)
			}
			this.yearArr.push(yearArr)
			this.year = year;
			this.month = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
			if (data.city) {
				this.form.city  = data.city;
				this.curTab = {
					type: '2'
				};
			}
			if (data.index) {
				this.customIdx = data.index;
			}
		},
	}
</script>
<script module="echarts" lang="renderjs">
	let myChart
	let _ownerInstance
	export default {
		mounted() {
			if (typeof window.echarts === 'function') {
				this.initEcharts()
			} else {
				// 动态引入较大类库避免影响页面展示
				const script = document.createElement('script')
				// view 层的页面运行在 www 根目录，其相对路径相对于 www 计算
				script.src = 'static/echarts.js'
				script.onload = this.initEcharts.bind(this)
				document.head.appendChild(script)
			}
		},
		methods: {
			initEcharts() {
				myChart = echarts.init(document.getElementById('echarts'))
				// 观测更新的数据在 view 层可以直接访问到
				myChart.setOption(this.option)
				myChart.on('selectchanged', 'series', function(res) {
					_ownerInstance.callMethod('onEchartSelect', {
						res,
					})
					// {
					// 	"type": "selectchanged",
					// 	"selected": [{
					// 		"dataIndex": [4],
					// 		"seriesIndex": 0
					// 	}],
					// 	"isFromClick": true,
					// 	"fromAction": "select",
					// 	"fromActionPayload": {
					// 		"type": "select",
					// 		"dataIndexInside": 4,
					// 		"seriesIndex": 0,
					// 		"isFromClick": true
					// 	}
					// }
				});
			},
			updateEcharts(newValue, oldValue, ownerInstance, instance) {
				if (!_ownerInstance) {
					_ownerInstance = ownerInstance
				}
		
				if (oldValue.xAxis) {
					let arr = []
					oldValue.xAxis.data.forEach((item, idx) => {
						arr.push(idx);
					}) 
					myChart.dispatchAction({type: 'unselect', seriesIndex: 0, dataIndex: arr})
				}
				if (newValue.custom) {
					setTimeout(() => {
						myChart.dispatchAction({type: 'select', seriesIndex: 0, dataIndex: [newValue.custom.index]})
					}, 0)
				}
			
				// myChart.dispose();
				// // 监听 service 层数据变更
				// this.initEcharts()
				
				myChart.setOption(newValue)
			},
			onClick(event, ownerInstance) {
				// 调用 service 层的方法
				ownerInstance.callMethod('onViewClick', {
					test: 'test'
				})
			}
		},
	}
</script>


<style lang="scss" scoped>
	/deep/ .uni-picker-view-content>* {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding: 0 10rpx;
		width: calc(100% - 20rpx);
	}

	.charts {
		width: 100%;
		box-sizing: border-box;
		height: 315rpx;
		padding: 0 70rpx;
		padding-left: calc(70rpx - 15px);
		margin-bottom: 30rpx;
		margin-top: 15rpx;
		#echarts {
			width: 100%;
			height: 100%;
		}
	}

	.section-0 {
		width: 100%;
		background: #2e5efe;

		.section-body {
			width: 100%;
			height: 100%;
			border-top-left-radius: 50rpx;
			border-top-right-radius: 50rpx;
			background-color: #fff;
			overflow: hidden;
			padding-bottom: 50rpx;

			.list {
				width: 100%;
				box-sizing: border-box;
				padding: 0 40rpx;
				box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(0, 0, 0, 0.05) inset;

				.item {
					width: 100%;
					border-bottom: solid 2rpx #f2f2f0;

					.parent {
						width: 100%;
						padding: 30rpx 0;
						@include clear();
						.mark{
							width: 30rpx;
							text-align: right;
							float: right;
							height: 30rpx;
							line-height: 30rpx;
							padding: 10rpx 0;
							.iconfont{
								font-size: 30rpx;
								color: #1534ce;
							}
						}
						.name {
							width: calc(100% - 80rpx);
							height: auto;
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 30rpx;
							letter-spacing: 2rpx;
							color: #3b3c40;
							// text-overflow: ellipsis;
							// overflow: hidden;
							// white-space: nowrap;
							float: left;
							padding: 10rpx 0;

							.status {
								display: inline-block;
								padding-left: 10rpx;
								padding-right: 10rpx;
								height: 30rpx;
								line-height: 30rpx;
								background-color: #00cdb4;
								border-radius: 15rpx;
								text-align: center;
								font-size: 16rpx;
								color: #fff;
								margin-right: 8rpx;
								position: relative;
								top: -5rpx;
							}
						}
						
						.action {
							float: left;
							width: 32rpx;
							margin-right: 18rpx;
							height: 40rpx;
							line-height: 40rpx;
							text-align: left;
							color: #3b3c40;

							.iconfont {
								font-size: 32rpx;
								transition: 0.2s ease;
								transform: rotate(90deg);
							}

						}
					}

					.child {
						width: 750rpx;
						margin-left: - 40rpx;
						background: #f2f2fa;

						.child-item {
							width: 670rpx;
							margin-left: 40rpx;
							border-bottom: 2rpx solid #e3e8f5;

							&:last-child {
								border-bottom: none;
							}

							box-sizing: border-box;
							padding-left: 50rpx;
							padding-top: 20rpx;
							padding-bottom: 20rpx;

							.child-status {
								width: 100%;
								height: 20rpx;
								@include clear();

								.circle {
									float: left;
									width: 14rpx;
									height: 14rpx;
									border-radius: 50%;
									background: #badc1f;
									margin-top: 5rpx;
								}

								.status-name {
									float: left;
									height: 20rpx;
									line-height: 20rpx;
									margin-left: 10rpx;
									font-size: 16rpx;
									color: #7f98ae;
								}
							}

							.top {
								width: 100%;
								@include clear();
								padding-bottom: 10rpx;

								.name {
									float: left;
									width: 620rpx;
									padding: 10rpx 0;
									line-height: 30rpx;
									color: #3b3c40;
									font-size: 26rpx;
									// text-overflow: ellipsis;
									// overflow: hidden;
									// white-space: nowrap;
								}
								
								.info{
									@include font-small;
									padding: 10rpx 0;
								}
								
								.imgs {
									padding-top: 10rpx;
									width: 100%;
									@include clear();

									.img {
										float: left;
										margin-right: 25rpx;
										padding: 0 10rpx;
										height: 42rpx;
										background-color: #ffffff;
										border-radius: 21rpx;
										text-align: center;
										line-height: 42rpx;
										font-size: 16rpx;
										font-weight: bold;
										font-stretch: normal;
										line-height: 42rpx;
										letter-spacing: 0rpx;
										color: #1534ce;
										box-shadow: 0 0 30rpx 8rpx rgba(#bcbcb5, 0.17);

										&:last-child {
											margin-right: 0;
										}
									}

									.img_disabled {
										color: rgba(#999, 0.3);
									}

								}

							}
						}
					}
				}

				.item__expand {
					.parent {
						.action {
							.iconfont {
								transform: rotate(-90deg);
							}
						}
					}

					.child {
						box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(0, 0, 0, 0.03) inset;
					}
				}

			}

			.actions {
				width: 100%;
				height: 50rpx;
				margin-top: 29rpx;
				padding-bottom: 40rpx;
				display: flex;
				justify-content: space-between;

				.action {
					width: 288rpx;
					height: 48rpx;
					background-color: #395cf5;
					border-radius: 20rpx;
					text-align: center;
					line-height: 48rpx;
					font-size: 26rpx;
					font-weight: normal;
					font-stretch: normal;
					line-height: 48rpx;
					color: #ffffff;

					text {
						&:first-child {
							margin-right: 20rpx;
						}
					}
				}

				.search {
					background-color: #1534ce;
				}
			}

			.form {
				width: 100%;
				padding: 0 75rpx;
				padding-top: 0rpx;
				box-sizing: border-box;
				position: relative;

				.area-container {
					position: absolute;
					top: 110rpx;
					left: 75rpx;
					z-index: 10;
					width: 600rpx;
					background-color: #1433cd;
					border-radius: 20rpx;
					box-sizing: border-box;
					padding: 24rpx;
					padding-bottom: 12rpx;

					&::before {
						position: absolute;
						top: -12rpx;
						left: 32rpx;
						content: '';
						border-bottom: 12rpx solid #1433cd;
						border-left: 12rpx solid transparent;
						;
						border-right: 12rpx solid transparent;
					}

					.item {
						padding: 0 18rpx;
						height: 44rpx;
						background-color: #fafbfd;
						border-radius: 20rpx;
						margin-bottom: 12rpx;
						color: #1433cd;
						font-size: 26rpx;
						text-align: center;
						line-height: 44rpx;
						float: left;
						margin-right: 12rpx;
					}

					.item__active {
						background-color: orange;
						color: #fff;
					}

				}

				.form-item2 {

					width: 600rpx;
					height: 48rpx;
					border-radius: 20rpx;
					border: solid 2rpx #1534ce;
					margin: 0 auto;
					margin-bottom: 34rpx;
					@include clear();

					.label {
						float: left;
						width: 134rpx;
						height: 48rpx;
						text-align: center;
						line-height: 44rpx;
						font-size: 26rpx;
						font-weight: normal;
						font-stretch: normal;
						letter-spacing: 0rpx;
						color: #1534ce;
					}

					.shape {
						width: 3rpx;
						height: 32rpx;
						background-color: #7f98ae;
						float: left;
						margin-top: 8rpx;
					}

					.input {
						float: left;
						width: calc(100% - 134rpx - 3rpx);

						.input-body {
							box-sizing: border-box;
							width: 100%;
							height: 44rpx;
							padding: 0 !important;
							border: none;
							padding-left: 30rpx !important;
							padding-right: 30rpx !important;
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: rgba(0, 0, 0, 0.7);
						}

						.input-placeholder {
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: rgba(0, 0, 0, 0.5);
						}
					}

				}

				.form-item {
					width: 600rpx;
					height: 48rpx;
					border-radius: 20rpx;
					border: solid 2rpx #1534ce;
					margin: 0 auto;
					margin-bottom: 34rpx;
					@include clear();

					.label {
						float: left;
						width: 77rpx;
						height: 48rpx;
						text-align: center;
						line-height: 44rpx;
						font-size: 26rpx;
						font-weight: normal;
						font-stretch: normal;
						letter-spacing: 0rpx;
						color: #1534ce;
					}

					.shape {
						width: 3rpx;
						height: 32rpx;
						background-color: #7f98ae;
						float: left;
						margin-top: 8rpx;
					}

					.input {
						float: left;
						width: calc(100% - 77rpx - 80rpx - 3rpx);

						.input-body {
							box-sizing: border-box;
							width: 100%;
							height: 44rpx;
							line-height: 44rpx;
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: #1534ce;
							text-align: center;
							text-overflow: ellipsis;
							overflow: hidden;
							white-space: nowrap;
						}
					}

					.action {
						float: left;
						width: 80rpx;
						line-height: 44rpx;
						height: 44rpx;
						text-align: center;
						font-size: 32rpx;
						color: #1534ce;
						transition: 0.3s ease;
					}

					.action__active {
						transform: rotate(180deg);
					}
				}

				.size2 {
					.label {
						width: 77rpx;
					}

					.input {
						width: calc(100% - 77rpx - 3rpx);
						position: relative;

						.iconfont {
							position: absolute;
							right: 25rpx;
							top: 7rpx;
							font-size: 30rpx;
							color: #dad9df;
						}
					}
				}

			}

			.total {
				box-sizing: border-box;
				padding: 0 70rpx;
				height: 80rpx;
				line-height: 70rpx;
				font-size: 22rpx;
				font-weight: normal;
				font-stretch: normal;
				line-height: 80rpx;
				letter-spacing: 0rpx;
				color: #3b3c40;

				.date-picker {
					height: 80rpx;
					line-height: 80rpx;
					float: right;
					font-size: 22rpx;

					.iconfont {
						line-height: 80rpx;
						font-size: 30rpx;
						color: #d8d8d5;
					}
				}
			}

			.charts {
				width: 100%;
				box-sizing: border-box;
				height: 315rpx;
				padding: 0 70rpx;
				padding-left: calc(70rpx - 15px);
				margin-bottom: 30rpx;

				#echarts {
					width: 100%;
					height: 100%;
				}
			}

			.top-tab {
				width: 670rpx;
				margin-left: 40rpx;
				height: 52rpx;
				line-height: 52rpx;
				display: flex;
				justify-content: space-between;
				box-sizing: border-box;
				padding: 0 30rpx;
				margin-top: 15rpx;
				border-bottom: solid 3rpx #f2f2f0;

				.item {
					font-size: 26rpx;
					font-weight: normal;
					font-stretch: normal;
					line-height: 50rpx;
					letter-spacing: 0rpx;
					color: #d8d8d5;
					position: relative;

					.shape {
						opacity: 0;
						transform: translateY(6rpx);
						position: absolute;
						bottom: -6rpx;
						width: 100%;
						height: 8rpx;
						background-color: #1534ce;
						border-radius: 8rpx;
						transition: 0.3s ease;
					}
				}

				.item__active {
					color: #3b3c40;

					.shape {
						opacity: 1;
						transform: translateY(0rpx);
					}
				}
			}
		}
	}
</style>
